package com.tao.ai.controller;

import com.tao.ai.config.FaceSpot;
import org.json.JSONException;
import org.json.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/faceLogin")
public class FaceController {
    @RequestMapping("/searchFace")
    @ResponseBody
    public String searchFace(String img) throws JSONException {
        JSONObject js = FaceSpot.searchFace(img,"face","1");
        System.out.println(js.toString(2));
        return js.toString();
    }
}
